package org.dromara.report.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import lombok.RequiredArgsConstructor;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseService;
import org.dromara.report.domain.ReportBill;
import org.dromara.report.service.ReportBillServiceImpl;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 首页获取展示信息
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/report/bill")
public class ReportBillController extends BaseService {

  private final ReportBillServiceImpl reportBillService;

  /**
   * 首页获取订单收支信息
   */
  @SaCheckPermission("report:bill:getList")
  @GetMapping("/getList")
  public TableDataInfo<ReportBill> getBillList(ReportBill bo) {
    return TableDataInfo.build(reportBillService.getBillNum(bo));
  }

  /**
   * 首页获取订单收支信息
   */
  @SaCheckPermission("report:bill:getAccount")
  @GetMapping("/getAccount")
  public TableDataInfo<ReportBill> getFmsAccount() {
    return TableDataInfo.build(reportBillService.getFmsAccount());
  }


}
